import { ChartData } from './bean';

const data:ChartData[] = [
  {
    id: 1,
    title: "基本柱状图",
    props: {
      type: "column",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: 0
            }
          ]
        },
        extra: {
          column: {
            type: "group",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "目标值",
            data: [35,36,31,33,13,34]
          },
          {
            name: "完成量",
            data: [18,27,21,24,6,28]
          }
        ]
      }
    }
  },
  {
    id: 2,
    title: "堆叠柱状图",
    props: {
      type: "column",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: 0
            }
          ]
        },
        extra: {
          column: {
            type: "stack",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08,
            labelPosition: "center"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "目标值",
            textColor: "#FFFFFF",
            data: [35,36,31,33,13,34]
          },
          {
            name: "完成量",
            textColor: "#FFFFFF",
            data: [18,27,21,24,6,28]
          }
        ]
      }
    }
  },
  {
    id: 3,
    title: "圆角+渐变+半透明柱状图",
    props: {
      type: "column",
      opts: {
        color: ["#FAC858","#EE6666","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: 0
            }
          ]
        },
        extra: {
          column: {
            type: "group",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08,
            linearType: "custom",
            seriesGap: 5,
            linearOpacity: 0.5,
            barBorderCircle: true,
            customColor: [
              "#FA7D8D",
              "#EB88E2"
            ]
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "目标值",
            data: [35,36,31,33,13,34]
          },
          {
            name: "完成量",
            data: [18,27,21,24,6,28]
          }
        ]
      }
    }
  },
  {
    id: 4,
    title: "温度计图表",
    props: {
      type: "column",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: 0
            }
          ]
        },
        extra: {
          column: {
            type: "meter",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08,
            meterBorder: 3,
            meterFillColor: "#EBFBD6"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "目标值",
            data: [35,36,31,33,13,34]
          },
          {
            name: "完成量",
            data: [18,27,21,24,6,28]
          }
        ]
      }
    }
  },
  {
    id: 5,
    title: "圆角温度计图表",
    props: {
      type: "column",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {
          show: false
        },
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: -40,
              max: 40
            }
          ],
          splitNumber: 4
        },
        extra: {
          column: {
            type: "group",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08,
            barBorderCircle: true,
            linearType: "custom"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [20,-20,25,-25,30,-30]
          }
        ]
      }
    }
  },
  {
    id: 6,
    title: "正负柱状图",
    props: {
      type: "column",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,15,0,5],
        enableScroll: false,
        legend: {
          show: false
        },
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          data: [
            {
              min: -40,
              max: 40
            }
          ],
          splitNumber: 4
        },
        extra: {
          column: {
            type: "group",
            width: 30,
            activeBgColor: "#000000",
            activeBgOpacity: 0.08,
            barBorderCircle: true,
            linearType: "custom"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [20,-20,25,-25,30,-30]
          }
        ]
      }
    }
  }
]

export default  data;